//
//  TJQuestionDetailController.m
//  Teleport
//
//  Created by botu　 on 2020/8/12.
//  Copyright © 2020 byx. All rights reserved.
//

#import "TJQuestionDetailController.h"
#import <WebKit/WebKit.h>
@interface TJQuestionDetailController ()

@end

@implementation TJQuestionDetailController

- (void)viewDidLoad {
    [super viewDidLoad];

    
    WKPreferences *pre = [[WKPreferences alloc] init];

    pre.javaScriptEnabled = YES;

    WKWebViewConfiguration *con = [[WKWebViewConfiguration alloc] init];

    con.preferences= pre;

    WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, KNavBarHight, self.view.frame.size.width,self.view.frame.size.height-KNavBarHight) configuration:con];

    [self.view addSubview:webView];
    NSString *string = @"";
    switch (self.type) {
        
            case 0:
            string = @"privacyBank";
         
            break;
            case 1:
             string = @"privacyBuy";
            break;
            case 2:
            string = @"privacyStore";
            break;
        default:
            break;
    }

    NSString *bundleStr = [[NSBundle mainBundle] pathForResource:string ofType:@"html"];
        
    NSURL *URL = [NSURL fileURLWithPath:bundleStr];
        
    [webView loadRequest:[NSURLRequest requestWithURL:URL]];


    
}


@end
